import request from '@/utils/request'

//统一字典下拉框查询
export function adminDict(params) {
  return request({
    url: `common/v1/adminDict`,
    params
  })
}



// 神椰广告链接配置列表
export function advertisementList(advertisePageType) {
  return request({
    url: `/shenye/advertisement/link/config/getList/${advertisePageType}`,
    method: 'get',
  })
}
//新增 神椰广告链接配置
export function addAdvertisement(data) {
  return request({
    url: '/shenye/advertisement/link/config',
    method: 'post',
    data: data
  })
}
//编辑 神椰广告链接配置
export function editAdvertisement(data) {
  return request({
    url: '/shenye/advertisement/link/config',
    method: 'put',
    data: data
  })
}
//神椰广告链接配置详情
export function advertisementInfo(params) {
  return request({
    url: `/shenye/advertisement/link/config/detail`,
    method: 'get',
    params
  })
}
//删除 神椰广告链接配置
export function deleteAdvertisement(id) {
  return request({
    url: `/shenye/advertisement/link/config/${id}`,
    method: 'DELETE',
  })
}


// 获取神椰广告轮播图列表
export function bannerList(advertisePageType) {
  return request({
    url: `/shenye/banner/config/getBannerList/${advertisePageType}`,
    method: 'get',
  })
}

// 新增 神椰广告轮播图配置
export function addBanner(data) {
  return request({
    url: '/shenye/banner/config',
    method: 'post',
    data: data
  })
}

// 编辑 神椰广告轮播图配置
export function editBanner(data) {
  return request({
    url: '/shenye/banner/config',
    method: 'put',
    data: data
  })
}

// 神椰广告轮播图配置详情
export function bannerInfo(advertisePageType) {
  return request({
    url: `/shenye/banner/config/detail/${advertisePageType}`,
    method: 'get'
  })
}

//神椰广告配置 轮播图跳转下拉
export function bannerSelect(data) {
  return request({
    url: `/shenye/advertisement/config/banner/select`,
    method: 'get',
    params: data
  })
}
// 编辑 神椰广告链接配置排序
export function editAdvertisementSort(data) {
  return request({
    url: '/shenye/advertisement/link/config/editSort',
    method: 'put',
    data: data
  })
}



// 改变激励状态[启用-停用]
export function medalShowStatus(data) {
  return request({
    url: '/shenye/medal/show/status',
    method: 'put',
    data: data
  })
}


//查询神椰打卡活动下拉框
export function punchActivitySelect(data) {
  return request({
    url: `/shenye/advertisement/punchActivity/config/punchActivitySelect`,
    method: 'get',
    params: data
  })
}


//NFR推荐列表 中台配置
export function getEquityCardSummaryConfigList(query) {
  return request({
    url: `/equity/card/config/v1/getEquityCardSummaryConfigList`,
    method: 'get',
    params: query
  })
}
//编辑 推荐资产配置排序
export function editEquitySort(data) {
  return request({
    url: '/equity/card/config/v1/editSort',
    method: 'put',
    data: data
  })
}

//平台NFR、商户NFR下拉
export function nfrSelect(data) {
  return request({
    url: `/equity/card/config/v1/nfrSelect`,
    method: 'get',
    params: data
  })
}
//查询配置推荐资产列表 不分页
export function equitylist(query) {
  return request({
    url: `/equity/card/config/v1/list`,
    method: 'get',
    params: query
  })
}
// 保存配置推荐资产
export function editEquityConfig(data) {
  return request({
    url: '/equity/card/config/v1/save',
    method: 'put',
    data: data
  })
}
//获取展示轮播图或者背景图  1 轮播图 2 背景图
export function getShowType() {
  return request({
    url: `/shenye/banner/config/getShowType`,
    method: 'get',
  })
}
//设置展示轮播图或者背景图
export function setShowType(showType) {
  return request({
    url: `/shenye/banner/config/setShowType/${showType}`,
    method: 'put',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  })
}
//获取神椰背景
export function getShenyeBackground() {
  return request({
    url: `/shenye/banner/config/getShenyeBackground`,
    method: 'get',
  })
}
// 设置神椰背景
export function setShenyeBackground(data) {
  return request({
    url: '/shenye/banner/config/setShenyeBackground',
    method: 'put',
    data: data
  })
}
//打卡活动下拉
export function activitySelectList(data) {
  return request({
    url: `/shenye/trade/punch/activity/config/v1/activitySelectList`,
    method: 'get',
    params: data
  })
}
// 保存打卡活动配置
export function activitySave(data) {
  return request({
    url: '/shenye/trade/punch/activity/config/v1/save',
    method: 'put',
    data: data
  })
}
//获取中台 打卡活动配置列表
export function getActivityLs(data) {
  return request({
    url: `/shenye/trade/punch/activity/config/v1/list`,
    method: 'get',
    params: data
  })
}
//H5 获取区域
export function getTradeArea(data) {
  return request({
    url: `/shenye/trade/punch/activity/config/v1/getTradeArea`,
    method: 'get',
    params: data
  })
}
//H5 打卡活动配置列表
export function activityh5Ls(data) {
  return request({
    url: `/shenye/trade/punch/activity/config/v1/h5/list`,
    method: 'get',
    params: data
  })
}
//中台 推荐列表分类列表 不分页
export function recommendTypels(data) {
  return request({
    url: `/equity/card/recommend/type/v1/list`,
    method: 'get',
    params: data
  })
}
// 保存推荐列表分类
export function recommendSave(data) {
  return request({
    url: '/equity/card/recommend/type/v1/save',
    method: 'put',
    data: data
  })
}
//H5 推荐列表分类列表 不分页
export function recommendH5Typels(data) {
  return request({
    url: `/equity/card/recommend/type/v1/h5/list`,
    method: 'get',
    params: data
  })
}

//!..................shenye-3.0  2024-8-27..........................!

//获取搜索配置
export function homePageSearch(data) {
  return request({
    url: `/shenye/points/wallet/home/page/search`,
    method: 'get',
    params: data
  })
}
//获取插件下拉列表
export function homePagePlugin(data) {
  return request({
    url: `/shenye/points/wallet/home/page/plugin`,
    method: 'get',
    params: data
  })
}
//获取对应插件组件列表
export function homePagePagePluginId(pluginId) {
  return request({
    url: `/shenye/jtk/home/page/page/${pluginId}`,
    method: 'get',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  })
}
//获取对应插件组件列表
export function homePagePagePluginIdView(pluginId) {
  return request({
    url: `/shenye/points/wallet/home/page/page/${pluginId}`,
    method: 'get',
    headers: {
      'Content-Type': 'application/x-www-form-urlencoded'
    },
  })
}
// 设置搜索配置
export function homePageSet(data) {
  return request({
    url: '/shenye/points/wallet/home/page/search',
    method: 'post',
    data: data
  })
}
//获取公告配置信息
export function homePageNotice(data) {
  return request({
    url: `/shenye/points/wallet/home/page/notice`,
    method: 'get',
    params: data
  })
}
// 修改公告配置信息
export function homePageNoticeSet(data) {
  return request({
    url: '/shenye/points/wallet/home/page/notice',
    method: 'post',
    data: data
  })
}
//获取消费获积分配置
export function homePageNavigation(data) {
  return request({
    url: `/shenye/points/wallet/home/page/navigation`,
    method: 'get',
    params: data
  })
}
// 设置消费获积分配置
export function homePageNavigationSet(data) {
  return request({
    url: '/shenye/points/wallet/home/page/navigation',
    method: 'put',
    data: data
  })
}
// 设置消费获积分前端显示状态
export function homePageNavigationShow(type) {
  return request({
    url: `/shenye/points/wallet/home/page/notice/show/${type}`,
    method: 'get',
  })
}
//获取积分通兑配置
export function homePageExchange(data) {
  return request({
    url: `/shenye/points/wallet/home/page/exchange`,
    method: 'get',
    params: data
  })
}
// 设置积分通兑配置
export function homePageExchangeSet(data) {
  return request({
    url: '/shenye/points/wallet/home/page/exchange',
    method: 'post',
    data: data
  })
}
//获取轮播图配置信息-聚推客
export function jtkHomePagebanner(data) {
  return request({
    url: `/shenye/jtk/home/page/banner`,
    method: 'get',
    params: data
  })
}
// 设置轮播图配置信息-聚推客
export function jtkHomePagebannerSet(data) {
  return request({
    url: '/shenye/jtk/home/page/banner',
    method: 'post',
    data: data
  })
}
//获取导航分类配置-聚推客
export function jtkHomePageClassification(data) {
  return request({
    url: `/shenye/jtk/home/page/classification`,
    method: 'get',
    params: data
  })
}
// 设置导航分类配置-聚推客
export function jtkHomePageClassificationSet(data) {
  return request({
    url: '/shenye/jtk/home/page/classification',
    method: 'post',
    data: data
  })
}
//获取页面组件列表-聚推客
export function jtkHomePageComponentsView(data) {
  return request({
    url: `/shenye/jtk/home/page/classification/components`,
    method: 'get',
    params: data
  })
}
// 设置页面组件-聚推客
export function jtkHomePageComponentsViewSet(data) {
  return request({
    url: '/shenye/jtk/home/page/classification/components',
    method: 'post',
    data: data
  })
}
//删除页面组件-聚推客
export function jtkHomePageComponentsViewDelete(id) {
  return request({
    url: `/shenye/jtk/home/page/classification/components/${id}`,
    method: 'DELETE',
  })
}
//获取对应导航分类图片列表-聚推客
export function jtkHomePageSkip(data) {
  return request({
    url: `/shenye/jtk/home/page/classification/skip`,
    method: 'get',
    params: data
  })
}
// 设置导航分类配置图片-聚推客
export function jtkHomePageSkipSet(data) {
  return request({
    url: '/shenye/jtk/home/page/classification/set/skip',
    method: 'post',
    data: data
  })
}
